package com.my.mybits.mapper;

import com.my.mybits.po.Book;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BookMapper {
    @Select("select * from book where course_id=#{courseId};")
    Book findBookByCourseId(int courseId);


    List<Book> findBookByPubId(int pubId);
    List<Book> findBookByUserId(int userId);

    @Select("select * from book where pub_id=#{id}"+" and price > #{price};")
    List<Book> findBookPubIdAndPrice(@Param("id") int pubId,@Param("price") float price);

}
